Keir Fraser [Wed, 5 Jan 2011 09:52:54 +0000 (09:52 +0000)]
x86 hvm: Add a missing line to record the type passed into register_io_handler()
Add a missing line to record the type passed into
register_io_handler()
Without this line, the BUFFERED_IO handler was never called.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Wed, 5 Jan 2011 09:52:18 +0000 (09:52 +0000)]
x86: Allow dom0 to write MSR IA32_ENERGY_PERF_BIAS
Allow dom0 to write MSR IA32_ENERGY_PERF_BIAS
There is a new hardware feature, which lets system software to set
Energy Performance Preference. This is a opaque knob in the form of
IA32_ENERGY_PERF_BIAS MSR, which has a 4 bit Energy Performance
Preference Hint.
The support for this feature is indicated by CPUID.06H.ECX.bit3. Refer
to Intel Architectures Software Developer's Manual for more info.
Let dom0 tools to control it.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Wed, 5 Jan 2011 09:50:21 +0000 (09:50 +0000)]
[VTD] added WLAN device ID on Fujitsu's platform in quirks.c
Added WLAN device ID 0x422C that was found on Fujitsu's Calpella
system to WLAN quirk.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Keir Fraser [Wed, 5 Jan 2011 09:48:43 +0000 (09:48 +0000)]
x86 amd: Revert 6382:
b74c15e4dd4f (AMD flush filter configuration)
Flush filter is not reliably supported by any processor, we already
have code to unconditionally disable the filter, so we don't need the
command-line config option. Remove it.
Signed-off-by: Keir Fraser <keir@xen.org>
Tim Deegan [Wed, 5 Jan 2011 09:41:28 +0000 (09:41 +0000)]
Enable 1GB HAP support by default.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Mukesh Rathor [Tue, 4 Jan 2011 15:40:00 +0000 (15:40 +0000)]
tools/gdbsx: Update gdbsx README
Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Tue, 4 Jan 2011 15:26:02 +0000 (15:26 +0000)]
tools/hotplug/Linux: only apply dummy MAC address to virtual devices.
Avoid applying to the bridge and physical network device.
This should un-break dom0 networking in the old xend-creates-bridge
setup (problem introduced in 22493:
937488219719).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tim Deegan [Tue, 4 Jan 2011 11:32:20 +0000 (11:32 +0000)]
x86/mm: Add p2m_lock in set_shared_p2m_entry
This avoids the immediate problem (calling set_p2m_entry() without the
lock held) but leaves the underlying problem (no consistent locking
order between page-sharing and p2m code) for later.
Signed-off-by: Jui-Hao Chiang <juihaochiang@gmail.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Mon, 27 Dec 2010 08:00:09 +0000 (08:00 +0000)]
x86 hvm: Missing chunk from TSC-deadline support patch.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 24 Dec 2010 10:56:29 +0000 (10:56 +0000)]
credit2: Fix x86_32 build.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 24 Dec 2010 10:23:08 +0000 (10:23 +0000)]
Xen MCE test: all test cases
Implement the test cases. Each of cases will call the common function,
then call mce inject tool. README for Xen MCE test suite, include the
framwork and test instruction.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Haicheng Li<haicheng.li@intel.com>
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Keir Fraser [Fri, 24 Dec 2010 10:22:23 +0000 (10:22 +0000)]
Xen MCE test: common functions to be used for test cases
Implement some common shell functions and variable definitions are
defined to be used by test cases Verify fuctions include domain0 user
space tool mcelog, Xen dmesg and guest kernel log verification.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Haicheng Li<haicheng.li@intel.com>
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Keir Fraser [Fri, 24 Dec 2010 10:21:27 +0000 (10:21 +0000)]
Xen MCE test: utilities to inject fake MCE for X86
A software MCE injection tool, which is based on Xen MCE injection
mechanism. It fake MCE error and inject this error to a assigned
Domain Physical Address. Makefile make sure the tool can be built on
Xen. A README explain the usage for this tool.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Haicheng Li<haicheng.li@intel.com>
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Keir Fraser [Fri, 24 Dec 2010 10:17:49 +0000 (10:17 +0000)]
libxc: Use .opic to build xenctrl_osdep_ENOSYS.so
Resolves build error:
/usr/bin/ld: xenctrl_osdep_ENOSYS.o: relocation R_X86_64_32
against `a local symbol' can not be used when making a shared
object; recompile with -fPIC
xenctrl_osdep_ENOSYS.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Clean up object files correctly too.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Fri, 24 Dec 2010 10:14:58 +0000 (10:14 +0000)]
ACPI: __init-annotate APEI code
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 10:14:36 +0000 (10:14 +0000)]
x86: a little bit of genapic cleanup
Eliminate redundancy among the individual handler functions, and mark
init-only functions as such.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 10:14:01 +0000 (10:14 +0000)]
VT-d: fix and improve print_vtd_entries()
Fix leaking of mapped domain pages (root_entry and ctxt_entry when
falling out of the level traversing loop). Do this by re-arranging
things slightly so that a mapping is retained only as long as it
really is needed.
Fix the failure to use map_domain_page() in the level traversing loop
of the function.
Add a mssing return statement in one of the error paths.
Also I wonder whether not being able to call print_vtd_entries() from
iommu_page_fault_do_one() in ix86 is still correct, now that
map_domain_page() is IRQ safe.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 10:12:58 +0000 (10:12 +0000)]
re-add calls accidentally deleted from run_all_nonirq_keyhandlers()
c/s 22538:
a3a29e67aa7e, having got applied in a form different from
the one submitted, resulted in the calls to
console_{start,end}_log_everything() getting removed without
replacement. Add them back since, other than run_all_keyhandlers(),
this doesn't run with log-everything already in effect.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 10:10:45 +0000 (10:10 +0000)]
Use bool_t for various boolean variables
... decreasing cache footprint. As a prerequisite this requires making
cmdline_parse() a little more flexible.
Also remove a few variables altogether, and adjust sections
annotations for several others.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 24 Dec 2010 08:47:59 +0000 (08:47 +0000)]
x86: link-time .data section adjustments
Fold compiler generated sections (mostly due to -fPIC on x86-64) into
the general .data and .data.read_mostly sections.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 08:47:23 +0000 (08:47 +0000)]
x86-64: use PC-relative exception table entries
... thus allowing to make the entries half their current size. Rather
than adjusting all instances to the new layout, abstract the
construction the table entries via a macro (paralleling a similar one
in recent Linux).
Also change the name of the section (to allow easier detection of
missed cases) and merge the final resulting output sections into
.data.read_mostly.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 08:46:46 +0000 (08:46 +0000)]
make sort() generally available
Rather than having this general library function only on ia64, move it
into common code, to be used by x86 exception table sorting too.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 08:42:52 +0000 (08:42 +0000)]
blkif: add placeholder for packet extension to block interface
While the corresponding implementation has been in our trees for quite
a while, it's in a state that doesn't make it suitable for submission,
and the original author having left the company leaves open to find
someone to complete this work. Yet to prevent problems with other
interface extensions we'd like to keep the slot in the number space
reserved for the purpose it has been serving here.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Fri, 24 Dec 2010 08:39:42 +0000 (08:39 +0000)]
x86 xsave: supports xsave (CPUID:0xD) enumeration for all sub-leaves.
In specific, it fixes the following issues:
1. The sub-leaves of CPUID:0x0000000D aren't contiguous. Hypervisor
shouldn't use register values to stop the enumeration. This patch
moves checking on XSAVE sub-leaves out of if-else statement. It also
bumps up sub-leaves to 63.
2. It creates a common function for xsave.
3. The main leaf 0 of CPUID:0x0000000D in current Xen is broken,
especially ECX and EBX registers. This patch cleans it up.
4. It adds support to detects EBX value of CPUID:0x0000000D main leaf
0 on-the-fly.
Signed-off-by: Wei Huang2 <wei.huang2@amd.com>
Keir Fraser [Fri, 24 Dec 2010 08:38:22 +0000 (08:38 +0000)]
x86 xsave: Enable xsave_feature[62] (AMD Lightweight Profiling)
The spec of LWP is available at
http://developer.amd.com/cpu/lwp/Pages/default.aspx.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Keir Fraser [Fri, 24 Dec 2010 08:37:34 +0000 (08:37 +0000)]
x86 xsave: Fix 64bit xsave_feature support for set_xcr0().
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Keir Fraser [Fri, 24 Dec 2010 08:32:43 +0000 (08:32 +0000)]
credit2: On debug keypress print load average as a fraction
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:32:20 +0000 (08:32 +0000)]
credit2: Different unbalance tolerance for underloaded and overloaded queues
Allow the "unbalance tolerance" -- the amount of difference between
two runqueues that will be allowed before rebalancing -- to differ
depending on how busy the runqueue is. If it's less than 100%,
default to a difference of 1.0; if it's more than 100%, default to a
tolerance of 0.125.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:31:54 +0000 (08:31 +0000)]
credit2: Introduce a loadavg-based load balancer
This is a first-cut at getting load balancing. I'm first working on
looking at behavior I want to get correct; then, once I know what kind
of behavior works well, then I'll work on getting it efficient.
The general idea is when balancing runqueues, look for the runqueue
whose loadavg is the most different from ours (higher or lower).
Then, look for a transaction which will bring the loads closest
together: either pushing a vcpu, pulling a vcpu, or swapping them.
Use the per-vcpu load to calculate the expected load after the
exchange.
The current algorithm looks at every combination, which is O(N^2).
That's not going to be suitable for workloads with large numbers of
vcpus (such as highly consolidated VDI deployments). I'll make a more
efficient algorithm once I've experimented and determined what I think
is the best load-balancing behavior.
At the moment, balance from a runqueue every time the credit resets.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:31:24 +0000 (08:31 +0000)]
credit2: Use loadavg to pick cpus, instead of instantaneous load
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:31:04 +0000 (08:31 +0000)]
credit2: Migrate request infrastructure
Put in infrastructure to allow a vcpu to requeset to migrate to a
specific runqueue. This will allow a load balancer to choose running
VMs to migrate, and know they will go where expected when the VM is
descheduled.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:30:42 +0000 (08:30 +0000)]
credit2: Track expected load
As vcpus are migrated, track how we expect the load to change. This
helps smooth migrations when the balancing doesn't take immediate
effect on the load average. In theory, if vcpu activity remains
constant, then the measured avgload should converge to the balanced
avgload.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:30:15 +0000 (08:30 +0000)]
credit2: Track average load contributed by a vcpu
Track the amount of load contributed by a particular vcpu, to help
us make informed decisions about what will happen if we make a move.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:29:53 +0000 (08:29 +0000)]
credit2: Calculate load average
Calculate a per-runqueue decaying load average.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:29:27 +0000 (08:29 +0000)]
credit2: Detect socket layout and assign one runqueue per socket
Because alloc_pdata() is called before the cpu layout information is
available, we grab a callback to the newly-created CPU_STARTING
notifier.
cpu 0 doesn't get a callback, so we simply hard-code it to runqueue 0.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:29:00 +0000 (08:29 +0000)]
credit2: Simple cpu picker based on instantaneous load
In preparation for multiple runqueues, add a simple cpu picker that
will look for
the runqueue with the lowest instantaneous load to assign the vcpu to.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:28:35 +0000 (08:28 +0000)]
credit2: Calculate instantaneous runqueue load
Add hooks in the various places to detect vcpus becoming active or
inactive. At the moment, record only instantaneous runqueue load;
but this lays the groundwork for having a load average.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:28:10 +0000 (08:28 +0000)]
credit2: Handle runqueue changes
In preparation for cross-runqueue migration, make changes to make that
more robust.
Changes include:
* An up-pointer from the svc struct to the runqueue it's assigned to
* Explicit runqueue assign/desassings, with appropriate ASSERTs
* cpu_pick will de-assign a vcpu from a runqueue if it's migrating,
and wake will re-assign it
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:27:42 +0000 (08:27 +0000)]
credit2: Refactor runqueue initialization
Several refactorizations:
* Add prv->initialized cpu mask
* Replace prv->runq_count with active_queue mask
* Replace rqd->cpu_min,cpu_mask with active cpu mask
* Put locks in the runqueue structure, rather than borrowing the
existing cpu locks
* init() initializes all runqueues to NULL, inactive, and maps all
pcpus to runqueue -q
* alloc_pcpu() will add cpus to runqueues, "activating" the runqueue
if necessary. All cpus are currently assigned to runqueue 0.
End-to-end behavior of the system should remain largely the same.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:26:59 +0000 (08:26 +0000)]
scheduler: Introduce pcpu_schedule_lock
Many places in Xen, particularly schedule.c, grab the per-cpu spinlock
directly, rather than through vcpu_schedule_lock(). Since the lock
pointer may change between the time it's read and the time the lock is
successfully acquired, we need to check after acquiring the lock to
make sure that the pcpu's lock hasn't changed, due to cpu
initialization or cpupool activity.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:26:29 +0000 (08:26 +0000)]
scheduler: Update vcpu_schedule_lock to check for changed lock pointer as well
Credit2 has different cpus share a lock; which means that as cpus are
added, and as they're moved between pools, the pointer to the
scheduler lock may also change as well.
Since we don't want to have to grab a lock before grabbing the per-cpu
scheduler lock, we use the lock itself to protect against the pointer
changing.
However, since it may change between reading and locking, after we
grab the lock we need to check to make sure it's still the right one.
Update the vcpu_schedule_lock() definition to reflect this: both
v->processor and that processor's schedule lock are liable to change;
check both after grabbing the lock, and release / re-acquire if
necessary.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Fri, 24 Dec 2010 08:25:54 +0000 (08:25 +0000)]
credit2: Quieten some debug messages
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Juergen Gross [Thu, 9 Dec 2010 10:50:53 +0000 (11:50 +0100)]
Support new xl command cpupool-numa-split
New xl command cpupool-numa-split which will create one cpupool for each
numa node of the machine. Can be called only if no other cpupools than Pool 0
are defined. After creation the cpupools can be managed as usual.
Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Juergen Gross [Thu, 9 Dec 2010 12:37:32 +0000 (13:37 +0100)]
Support renaming of cpupools
Add a new library function libxl_cpupool_rename() and a new xl command
xl cpupool-rename to support renaming of cpupools.
Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Juergen Gross [Thu, 9 Dec 2010 10:26:37 +0000 (11:26 +0100)]
Extend cpupools to support numa
The user interfaces for cpupools are extended to support numa machines:
- xl cpupool-create supports now specifying a node list instead of a cpu list.
The new cpupool will be created with all free cpus of the specified numa
nodes.
- xl cpupool-cpu-remove and xl cpupool-cpu-add can take a node number instead
of a cpu number. Using 'node:1' for the cpu parameter will, depending on
the operation, either remove all cpus of node 1 in the specified cpupool,
or add all free cpus of node 1 to the cpupool.
libxl is extended with the following functions to support this feature:
int libxl_cpupool_cpuadd_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus)
int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus)
Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Juergen Gross [Thu, 9 Dec 2010 10:23:20 +0000 (11:23 +0100)]
support topolgy info in xl info
Adds option -n/--numa to xl info command to print topology information.
No numa information up to now, as I've no machine which will give this info
via xm info (could be a bug in xm, however).
Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Juergen Gross [Thu, 9 Dec 2010 10:21:30 +0000 (11:21 +0100)]
Support getting topology info in libxl
Added new function libxl_get_topologyinfo() to obtain this information from
hypervisor.
Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: refactor Linux OS interface into a separate file.
This helps ensure that the osdep abstraction is complete by
allowing us to avoid including xc_private.h.
All the other OS backends could benefit from the same treatment but
since I cannot compile test I did not do this.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: move foreign memory functions to xc_foreign_memory.c
Now that this file exists it is a better home for these than xc_misc.c
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: add abitility to dynamically load osdep.
Add a dummy backend which always returns ENOSYS. Mainly as a compile
time testbed rather than because it is a useful backend.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: Use XC_PAGE_{SHIFT,MASK}.
Avoid dependency on xc_private.h
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: allow osdep backends to log via the xc infrastructure.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: drop fd from xc_interface
Transition to xc_osdep_handle is now complete and nothing uses
(or should be using) it.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: add ability to query OS interface for "fakeness"
i.e. not running on a real hypervisor
Allows users of the library to adjust behaviour. I don't especially
like this violation of the abstraction but both oxenstored and xapi
use this to avoid difficult to simulate operations when running on the
simulator.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_gnttab_set_max_grants()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_gnttab_munmap()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_gnttab_map_{grant_ref,grant_refs,domain_grant_refs}()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_{pending,unmask}()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_unbind()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_bind_virq()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_bind_interdomain()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_bind_unbound_port()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_notify()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_evtchn_fd()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_map_foreign_ranges()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_map_foreign_range()
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:47 +0000 (09:36 +0000)]
libxc: osdep: convert xc_map_foreign_{batch,bulk}
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:46 +0000 (09:36 +0000)]
libxc: osdep: convert do_xen_hypercall()
do_privcmd() was only ever used by do_xen_hypercall() so remove it.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Fri, 3 Dec 2010 09:36:46 +0000 (09:36 +0000)]
libxc: osdep: add framework for abstracting access to dom0 OS hypervisor interfaces.
This patch introduces the basic infrastructure and uses it for open
and close operations on privcmd, evtchn and gnttab devices.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Thu, 23 Dec 2010 15:32:52 +0000 (15:32 +0000)]
libxc: convert gnttab interfaces to use an opaque handle type
The xc_interface previously passed to xc_gnttab_* was only used for
logging which can now be done via the xc_gnttab handle instead.
This makes the interface consistent with the changes made to the main
interface in 21483:
779c0ef9682c.
Also update QEMU_TAG to pull in the corresponding qemu change.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 23 Dec 2010 15:25:57 +0000 (15:25 +0000)]
libxc: convert evtchn interfaces to use an opaque handle type
This makes the interface consistent with the changes made to the main
interface in 21483:
779c0ef9682c.
Also fix some references to "struct xc_interface" which should have
been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to
pull in the corresponding qemu change.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 23 Dec 2010 15:08:21 +0000 (15:08 +0000)]
libxc: some xc_gnttab_* functions are not Linux specific
They simply make hypercalls and perform other operations via the
abstract interface. Create xc_gnttab.c and move those functions there.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 22 Dec 2010 17:48:31 +0000 (17:48 +0000)]
tools/hotplug: read /etc/default/xencommons if appropriate
Since 22187:
c41252a55a0a we have been installing our example
xencommons settings file in either /etc/sysconfig or /etc/default,
depending on whether /etc/sysconfig exists.
However I omitted to add the code to /etc/init.d/xencommons to
actually read either version of the file, although every other init
script seems to have it.
An effect of this misplaced/unread file is that the automatic tests
don't cause xenconsoled to collect serial logs, because the tester
edits whichever file actually exists.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 21 Dec 2010 18:10:46 +0000 (18:10 +0000)]
EPT/VT-d: disable page sharing by default.
Currently sharing these page tables causes a hang on boot on some
hardware. Disable by default until this is resolved.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Tue, 21 Dec 2010 18:09:34 +0000 (18:09 +0000)]
x86 hvm ept: Remove EPT guest linear address validation
For EPT violation resulting from an attempt to load the guest PDPTEs
as part of the execution of the MOV CR instruction, the EPT_GLA_VALID
is not valid. This situation should not happen in most situation,
since we always populate guest memory. But this is not ture for PAE
guest under the PoD/Page sharing situation. In that situation, a page
pointed by CR3 may be un-populated, and we need handle it in such
situation.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Keir Fraser [Fri, 17 Dec 2010 16:12:37 +0000 (16:12 +0000)]
tools/hotplug/Linux: Avoid dependency on iptables conntrack module.
Checking for RELATED,ESTABLISHED traffic being sent to a domU requires
connection tracking, which adds unexpected (to most users) load to
dom0. Heavily loaded systems can fill the conntrack tables.
So avoid this, be more liberal in what we accept, and leave it to domU
to police its own input.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 17 Dec 2010 14:16:41 +0000 (14:16 +0000)]
x86, atomic: Fix 32-bit version of atomic_write64().
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 17 Dec 2010 11:51:10 +0000 (11:51 +0000)]
x86 ept: Define and use atomic_{read,write}_ept_entry().
Signed-off-by: Keir Fraser <keir@xen.org>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Fri, 17 Dec 2010 10:46:43 +0000 (10:46 +0000)]
vtd: Reinstate ACPI DMAR on system shutdown or S3/S4/S5.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 17 Dec 2010 09:54:22 +0000 (09:54 +0000)]
x86 hvm: Move CPUID.0xd (XSAVE) configuration into libxc.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 17 Dec 2010 09:25:00 +0000 (09:25 +0000)]
x86:xsaveopt: Enable xsaveopt feature in Xen and guest
This patch uses "xsaveopt" instead of "xsave" if the feature is
supported in hardware to optimize task switch performance in Xen. It
also exposes the feature to guest VMs.
Signed-off-by: Zhang Fengzhe <fengzhe.zhang@intel.com>
Keir Fraser [Thu, 16 Dec 2010 20:07:03 +0000 (20:07 +0000)]
xentrace: Clean up initialisation.
Allocate no memory and print no debug messages when disabled.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 20:06:36 +0000 (20:06 +0000)]
vtd: Clean up a recent printk message.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 19:36:35 +0000 (19:36 +0000)]
x86: Define pte_{read,write}[_atomic] in terms of atomic_readN
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 19:29:08 +0000 (19:29 +0000)]
x86: Define atomic_{read,write}{8,16,32,64} accessor functions.
These absolutely guarantee to read/write a uint*_t with a single atomic
processor instruction.
Also re-define atomic_read/atomic_write (act on atomic_t) similarly.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 19:04:11 +0000 (19:04 +0000)]
x86/bitops.h: Remove unused smp_mb__* macros
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 19:01:35 +0000 (19:01 +0000)]
x86/atomic.h: Clean up for Xen code style; remove unused smp_mb__*
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 18:46:55 +0000 (18:46 +0000)]
x86: Remove unnecessary LOCK/LOCK_PREFIX macros.
We don't support !CONFIG_SMP.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Thu, 16 Dec 2010 18:37:30 +0000 (18:37 +0000)]
x86: move early page fault code into .init.text
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Thu, 16 Dec 2010 18:37:20 +0000 (18:37 +0000)]
x86/asm: allow some unlikely taken branches to be statically predicted this way
... by moving the respective code out of line (into sub-section 1 of
the particular section). A few other branches could be eliminated
altogether.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Olaf Hering [Thu, 16 Dec 2010 18:25:33 +0000 (18:25 +0000)]
tools/xcutils: xc_save: add missing whitespace
Add missing whitespace between the two error strings.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Olaf Hering [Thu, 16 Dec 2010 18:24:57 +0000 (18:24 +0000)]
tools/libxc: fix comment typo in xc_domain_save
evey -> every
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Christoph Egger [Thu, 16 Dec 2010 18:24:04 +0000 (18:24 +0000)]
libxl: constify libxl_create_cpupool()
Attached patch constifies libxl_create_cpupool().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Christoph Egger [Thu, 16 Dec 2010 18:21:56 +0000 (18:21 +0000)]
tools, bsd: complete implementation of discard_file_cache
attached patch completes discard_file_cache() for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 16 Dec 2010 18:04:08 +0000 (18:04 +0000)]
xenstore: set implicit path for socket connections
For now assume all such connections come from domain 0.
Failure to do this breaks various scripts which assume that they
operate relative to the domains "home directory".
This matches the behaviour of the ocaml xenstored.
Thanks to report from Olaf Hering.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Thu, 16 Dec 2010 17:58:00 +0000 (17:58 +0000)]
tools/hotplug: Do not recursively invoke xenstore_write on error
This fixes a possible infinite recursion.
From: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 16 Dec 2010 17:39:24 +0000 (17:39 +0000)]
tools/xl: fix race which can leave an xl monitor processing hanging
If the domain is destroyed (eg with xl destroy), it is possible that
the xl which is monitoring the domain for restart/preserve will not be
able to get the domain shutdown reason.
Before this patch, it would then ignore the domain death event and
carry on waiting, forever, for more events.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 16 Dec 2010 16:58:39 +0000 (16:58 +0000)]
QEMU_TAG update
Keir Fraser [Thu, 16 Dec 2010 15:41:52 +0000 (15:41 +0000)]
audit_p2m: fix syntax errors in disabled debug code
If P2M_PRINTK is re-defined as ordinary printk,
some (disabled) debug statements will not compile.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Keir Fraser [Thu, 16 Dec 2010 15:38:57 +0000 (15:38 +0000)]
vtd: Require unmap_vtd_domain_page() on a couple of early exit paths.
From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xen.org>